<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		  <style>
		        .box{
		            width: 1400px;
		            margin: 30px auto;
		        }
		        .box  a{
		            display: block;
		            width: 100px;
		            height: 35px;
		           
		            float: left;
		            text-align: center;
		            line-height: 30px;
		            text-decoration: none;
		            background-color: green;
		            color: white;
		            
		
		        }
			/* 	.box a :hove{
					color:red;
					background-color:greenyellow;
				}
		 */
		
		
		
		    </style>
		</head>
		<body>
		    <div class="box"  id="d1">
		    <a href="#">首页</a>
		    <a href="#">国内</a>
		    <a href="#">国际</a>
		    <a href="#">军事</a>
		    <a href="#">财经</a>
		
		 <a href="#">娱乐</a>
		 <a href="#">体育</a>
		 <a href="#">互联网</a>
		 <a href="#">科技</a>
		 <a href="#">游戏</a>
		 <a href="#">女人</a>
		 <a href="#">汽车</a>
		 <a href="#">房产</a>
		
		</div>
		  <script>
		
		
		  var    as=  d1.children;
		  for(var i=0;i<as.length;i++){
		      as[i].onmouseover=function(){
		          this.style.backgroundColor="red";
		
		      }
		      as[i].onmouseout=function(){
		    this.style.backgroundColor="blue";
		    } 
		
		
		  }
		
		
		
		
		  </script>
		
		
		
		
		    
		</body>
	</body>
</html>
